﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EPiServer.Core;
using EPiServer.PlugIn;
using EPiServer.SpecializedProperties;
using FilteredPageReference;

namespace CustomizablePageReference
{
    /// <summary>
    /// Customizable link collection property.
    /// </summary>
    [Serializable]
    [PageDefinitionTypePlugIn(DisplayName = "Cusomizable Link Collection",
        Description = "Allows you to customize what types of pages can be picked")]
    public class PropertyCustomizableLinkCollection : PropertyLinkCollection
    {
        /// <summary>
        /// Creates the property control.
        /// </summary>
        /// <returns>IPropertyControl class.</returns>
        public override IPropertyControl CreatePropertyControl()
        {
            return new PropertyCustomizableLinkCollectionControl(GetSettings());
        }

        /// <summary>
        /// Gets the settings.
        /// </summary>
        /// <returns>Settings for property.</returns>
        public virtual PropertyFilteredPageReferenceSettings GetSettings()
        {
            return new PropertyFilteredPageReferenceSettings();
        }
    }
}
